<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>DataSpec (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="DataSpec (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":9,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.upstream</a></div>
<h2 title="Class DataSpec" class="title">Class DataSpec</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.upstream.DataSpec</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">DataSpec</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
<div class="block">Defines a region of data in a resource.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream">DataSpec.Builder</a></span></code></th>
<td class="colLast">
<div class="block">Builds <a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec</code></a> instances.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream">DataSpec.Flags</a></span></code></th>
<td class="colLast">
<div class="block">The flags that apply to any request for data.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DataSpec.HttpMethod.html" title="annotation in com.google.android.exoplayer2.upstream">DataSpec.HttpMethod</a></span></code></th>
<td class="colLast">
<div class="block">HTTP methods supported by ExoPlayer <a href="HttpDataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>HttpDataSource</code></a>s.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#absoluteStreamPosition">absoluteStreamPosition</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#position"><code>position</code></a> except for specific use cases where the absolute position
     within the resource is required within a <a href="DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> chain.</div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#customData">customData</a></span></code></th>
<td class="colLast">
<div class="block">Application specific data.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_ALLOW_CACHE_FRAGMENTATION">FLAG_ALLOW_CACHE_FRAGMENTATION</a></span></code></th>
<td class="colLast">
<div class="block">Allows fragmentation of this request into multiple cache files, meaning a cache eviction policy
 will be able to evict individual fragments of the data.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_ALLOW_GZIP">FLAG_ALLOW_GZIP</a></span></code></th>
<td class="colLast">
<div class="block">Allows an underlying network stack to request that the server use gzip compression.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_DONT_CACHE_IF_LENGTH_UNKNOWN">FLAG_DONT_CACHE_IF_LENGTH_UNKNOWN</a></span></code></th>
<td class="colLast">
<div class="block">Prevents caching if the length cannot be resolved when the <a href="DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> is opened.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLAG_MIGHT_NOT_USE_FULL_NETWORK_SPEED">FLAG_MIGHT_NOT_USE_FULL_NETWORK_SPEED</a></span></code></th>
<td class="colLast">
<div class="block">Indicates there are known external factors that might prevent the data from being loaded at
 full network speed (e.g.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flags">flags</a></span></code></th>
<td class="colLast">
<div class="block">Request <a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream"><code>flags</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#HTTP_METHOD_GET">HTTP_METHOD_GET</a></span></code></th>
<td class="colLast">
<div class="block">HTTP GET method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#HTTP_METHOD_HEAD">HTTP_METHOD_HEAD</a></span></code></th>
<td class="colLast">
<div class="block">HTTP HEAD method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#HTTP_METHOD_POST">HTTP_METHOD_POST</a></span></code></th>
<td class="colLast">
<div class="block">HTTP POST method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#httpBody">httpBody</a></span></code></th>
<td class="colLast">
<div class="block">The HTTP request body, null otherwise.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#httpMethod">httpMethod</a></span></code></th>
<td class="colLast">
<div class="block">The HTTP method to use when requesting the data.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#httpRequestHeaders">httpRequestHeaders</a></span></code></th>
<td class="colLast">
<div class="block">Additional HTTP headers to use when requesting the data.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#key">key</a></span></code></th>
<td class="colLast">
<div class="block">A key that uniquely identifies the resource.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#length">length</a></span></code></th>
<td class="colLast">
<div class="block">The length of the data, or <a href="../C.html#LENGTH_UNSET"><code>C.LENGTH_UNSET</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#position">position</a></span></code></th>
<td class="colLast">
<div class="block">The position of the data when read from <a href="#uri"><code>uri</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#uri">uri</a></span></code></th>
<td class="colLast">
<div class="block">A <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a> from which data belonging to the resource can be read.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#uriPositionOffset">uriPositionOffset</a></span></code></th>
<td class="colLast">
<div class="block">The offset of the data located at <a href="#uri"><code>uri</code></a> within the resource.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.net.Uri)">DataSpec</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri)</code></th>
<td class="colLast">
<div class="block">Constructs an instance.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.net.Uri,byte%5B%5D,long,long,long,java.lang.String,int)">DataSpec</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
        byte[]&nbsp;postBody,
        long&nbsp;absoluteStreamPosition,
        long&nbsp;position,
        long&nbsp;length,
        <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
        int&nbsp;flags)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.net.Uri,int)">DataSpec</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
        int&nbsp;flags)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.net.Uri,int,byte%5B%5D,long,long,long,java.lang.String,int)">DataSpec</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
        int&nbsp;httpMethod,
        byte[]&nbsp;httpBody,
        long&nbsp;absoluteStreamPosition,
        long&nbsp;position,
        long&nbsp;length,
        <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
        int&nbsp;flags)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.net.Uri,int,byte%5B%5D,long,long,long,java.lang.String,int,java.util.Map)">DataSpec</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
        int&nbsp;httpMethod,
        byte[]&nbsp;httpBody,
        long&nbsp;absoluteStreamPosition,
        long&nbsp;position,
        long&nbsp;length,
        <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
        int&nbsp;flags,
        <a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;httpRequestHeaders)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.net.Uri,long,long)">DataSpec</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
        long&nbsp;position,
        long&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Constructs an instance.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.net.Uri,long,long,long,java.lang.String,int)">DataSpec</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
        long&nbsp;absoluteStreamPosition,
        long&nbsp;position,
        long&nbsp;length,
        <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
        int&nbsp;flags)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.net.Uri,long,long,java.lang.String)">DataSpec</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
        long&nbsp;position,
        long&nbsp;length,
        <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.net.Uri,long,long,java.lang.String,int)">DataSpec</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
        long&nbsp;position,
        long&nbsp;length,
        <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
        int&nbsp;flags)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.net.Uri,long,long,java.lang.String,int,java.util.Map)">DataSpec</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
        long&nbsp;position,
        long&nbsp;length,
        <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
        int&nbsp;flags,
        <a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;httpRequestHeaders)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream">DataSpec.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildUpon()">buildUpon</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a> initialized with the values of this instance.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHttpMethodString()">getHttpMethodString</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the uppercase HTTP method name (e.g., "GET", "POST", "HEAD") corresponding to the
 <a href="#httpMethod"><code>httpMethod</code></a>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStringForHttpMethod(int)">getStringForHttpMethod</a></span>&#8203;(int&nbsp;httpMethod)</code></th>
<td class="colLast">
<div class="block">Returns an uppercase HTTP method name (e.g., "GET", "POST", "HEAD") corresponding to the given
 <a href="DataSpec.HttpMethod.html" title="annotation in com.google.android.exoplayer2.upstream"><code>DataSpec.HttpMethod</code></a>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isFlagSet(int)">isFlagSet</a></span>&#8203;(int&nbsp;flag)</code></th>
<td class="colLast">
<div class="block">Returns whether the given flag is set.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#subrange(long)">subrange</a></span>&#8203;(long&nbsp;offset)</code></th>
<td class="colLast">
<div class="block">Returns a data spec that represents a subrange of the data defined by this DataSpec.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#subrange(long,long)">subrange</a></span>&#8203;(long&nbsp;offset,
        long&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Returns a data spec that represents a subrange of the data defined by this DataSpec.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#withAdditionalHeaders(java.util.Map)">withAdditionalHeaders</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;additionalHttpRequestHeaders)</code></th>
<td class="colLast">
<div class="block">Returns a copy this data spec with additional HTTP request headers.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#withRequestHeaders(java.util.Map)">withRequestHeaders</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;httpRequestHeaders)</code></th>
<td class="colLast">
<div class="block">Returns a copy of this data spec with the specified HTTP request headers.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#withUri(android.net.Uri)">withUri</a></span>&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri)</code></th>
<td class="colLast">
<div class="block">Returns a copy of this data spec with the specified Uri.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="FLAG_ALLOW_GZIP">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_ALLOW_GZIP</h4>
<pre>public static final&nbsp;int FLAG_ALLOW_GZIP</pre>
<div class="block">Allows an underlying network stack to request that the server use gzip compression.

 <p>Should not typically be set if the data being requested is already compressed (e.g. most
 audio and video requests). May be set when requesting other data.

 <p>When a <a href="DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> is used to request data with this flag set, and if the <a href="DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> does make a network request, then the value returned from <a href="DataSource.html#open(com.google.android.exoplayer2.upstream.DataSpec)"><code>DataSource.open(DataSpec)</code></a> will typically be <a href="../C.html#LENGTH_UNSET"><code>C.LENGTH_UNSET</code></a>. The data read from <a href="DataReader.html#read(byte%5B%5D,int,int)"><code>DataReader.read(byte[], int, int)</code></a> will be the decompressed data.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.upstream.DataSpec.FLAG_ALLOW_GZIP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLAG_DONT_CACHE_IF_LENGTH_UNKNOWN">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_DONT_CACHE_IF_LENGTH_UNKNOWN</h4>
<pre>public static final&nbsp;int FLAG_DONT_CACHE_IF_LENGTH_UNKNOWN</pre>
<div class="block">Prevents caching if the length cannot be resolved when the <a href="DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> is opened.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.upstream.DataSpec.FLAG_DONT_CACHE_IF_LENGTH_UNKNOWN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLAG_ALLOW_CACHE_FRAGMENTATION">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_ALLOW_CACHE_FRAGMENTATION</h4>
<pre>public static final&nbsp;int FLAG_ALLOW_CACHE_FRAGMENTATION</pre>
<div class="block">Allows fragmentation of this request into multiple cache files, meaning a cache eviction policy
 will be able to evict individual fragments of the data. Depending on the cache implementation,
 setting this flag may also enable more concurrent access to the data (e.g. reading one fragment
 whilst writing another).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.upstream.DataSpec.FLAG_ALLOW_CACHE_FRAGMENTATION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLAG_MIGHT_NOT_USE_FULL_NETWORK_SPEED">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_MIGHT_NOT_USE_FULL_NETWORK_SPEED</h4>
<pre>public static final&nbsp;int FLAG_MIGHT_NOT_USE_FULL_NETWORK_SPEED</pre>
<div class="block">Indicates there are known external factors that might prevent the data from being loaded at
 full network speed (e.g. server throttling or unfinished live media chunks).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.upstream.DataSpec.FLAG_MIGHT_NOT_USE_FULL_NETWORK_SPEED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="HTTP_METHOD_GET">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HTTP_METHOD_GET</h4>
<pre>public static final&nbsp;int HTTP_METHOD_GET</pre>
<div class="block">HTTP GET method.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.upstream.DataSpec.HTTP_METHOD_GET">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="HTTP_METHOD_POST">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HTTP_METHOD_POST</h4>
<pre>public static final&nbsp;int HTTP_METHOD_POST</pre>
<div class="block">HTTP POST method.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.upstream.DataSpec.HTTP_METHOD_POST">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="HTTP_METHOD_HEAD">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HTTP_METHOD_HEAD</h4>
<pre>public static final&nbsp;int HTTP_METHOD_HEAD</pre>
<div class="block">HTTP HEAD method.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.upstream.DataSpec.HTTP_METHOD_HEAD">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="uri">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uri</h4>
<pre>public final&nbsp;<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri</pre>
<div class="block">A <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a> from which data belonging to the resource can be read.</div>
</li>
</ul>
<a id="uriPositionOffset">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uriPositionOffset</h4>
<pre>public final&nbsp;long uriPositionOffset</pre>
<div class="block">The offset of the data located at <a href="#uri"><code>uri</code></a> within the resource.

 <p>Equal to 0 unless <a href="#uri"><code>uri</code></a> provides access to a subset of the resource. As an example,
 consider a resource that can be requested over the network and is 1000 bytes long. If <a href="#uri"><code>uri</code></a> points to a local file that contains just bytes [200-300], then this field will be set to
 <code>200</code>.

 <p>This field can be ignored except for in specific circumstances where the absolute position
 in the resource is required in a <a href="DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> chain. One example is when a <a href="DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> needs to decrypt the content as it's read. In this case the absolute position in
 the resource is typically needed to correctly initialize the decryption algorithm.</div>
</li>
</ul>
<a id="httpMethod">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>httpMethod</h4>
<pre><a href="DataSpec.HttpMethod.html" title="annotation in com.google.android.exoplayer2.upstream">@HttpMethod</a>
public final&nbsp;int httpMethod</pre>
<div class="block">The HTTP method to use when requesting the data. This value will be ignored by non-HTTP <a href="DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> implementations.</div>
</li>
</ul>
<a id="httpBody">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>httpBody</h4>
<pre>@Nullable
public final&nbsp;byte[] httpBody</pre>
<div class="block">The HTTP request body, null otherwise. If the body is non-null, then <code>httpBody.length</code>
 will be non-zero.</div>
</li>
</ul>
<a id="httpRequestHeaders">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>httpRequestHeaders</h4>
<pre>public final&nbsp;<a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt; httpRequestHeaders</pre>
<div class="block">Additional HTTP headers to use when requesting the data.

 <p>Note: This map is for additional headers specific to the data being requested. It does not
 include headers that are set directly by <a href="HttpDataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>HttpDataSource</code></a> implementations. In particular,
 this means the following headers are not included:

 <ul>
   <li><code>Range</code>: <a href="HttpDataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>HttpDataSource</code></a> implementations derive the <code>Range</code> header
       from <a href="#position"><code>position</code></a> and <a href="#length"><code>length</code></a>.
   <li><code>Accept-Encoding</code>: <a href="HttpDataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>HttpDataSource</code></a> implementations derive the <code>
       Accept-Encoding</code> header based on whether <a href="#flags"><code>flags</code></a> includes <a href="#FLAG_ALLOW_GZIP"><code>FLAG_ALLOW_GZIP</code></a>.
   <li><code>User-Agent</code>: <a href="HttpDataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>HttpDataSource</code></a> implementations set the <code>User-Agent</code>
       header directly.
   <li>Other headers set at the <a href="HttpDataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>HttpDataSource</code></a> layer. I.e., headers set using <a href="HttpDataSource.html#setRequestProperty(java.lang.String,java.lang.String)"><code>HttpDataSource.setRequestProperty(String, String)</code></a>, and using <a href="HttpDataSource.Factory.html#setDefaultRequestProperties(java.util.Map)"><code>HttpDataSource.Factory.setDefaultRequestProperties(Map)</code></a>.
 </ul></div>
</li>
</ul>
<a id="absoluteStreamPosition">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>absoluteStreamPosition</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public final&nbsp;long absoluteStreamPosition</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#position"><code>position</code></a> except for specific use cases where the absolute position
     within the resource is required within a <a href="DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> chain. Where the absolute
     position is required, use <code>uriPositionOffset + position</code>.</div>
</div>
<div class="block">The absolute position of the data in the resource.</div>
</li>
</ul>
<a id="position">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>position</h4>
<pre>public final&nbsp;long position</pre>
<div class="block">The position of the data when read from <a href="#uri"><code>uri</code></a>.</div>
</li>
</ul>
<a id="length">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>public final&nbsp;long length</pre>
<div class="block">The length of the data, or <a href="../C.html#LENGTH_UNSET"><code>C.LENGTH_UNSET</code></a>.</div>
</li>
</ul>
<a id="key">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>key</h4>
<pre>@Nullable
public final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> key</pre>
<div class="block">A key that uniquely identifies the resource. Used for cache indexing. May be null if the data
 spec is not intended to be used in conjunction with a cache.</div>
</li>
</ul>
<a id="flags">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flags</h4>
<pre><a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream">@Flags</a>
public final&nbsp;int flags</pre>
<div class="block">Request <a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream"><code>flags</code></a>.</div>
</li>
</ul>
<a id="customData">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>customData</h4>
<pre>@Nullable
public final&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a> customData</pre>
<div class="block">Application specific data.

 <p>This field is intended for advanced use cases in which applications require the ability to
 attach custom data to <a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec</code></a> instances. The custom data should be immutable.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(android.net.Uri)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DataSpec</h4>
<pre>public&nbsp;DataSpec&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri)</pre>
<div class="block">Constructs an instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - <a href="#uri"><code>uri</code></a>.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.net.Uri,long,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DataSpec</h4>
<pre>public&nbsp;DataSpec&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
                long&nbsp;position,
                long&nbsp;length)</pre>
<div class="block">Constructs an instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - <a href="#uri"><code>uri</code></a>.</dd>
<dd><code>position</code> - <a href="#position"><code>position</code></a>.</dd>
<dd><code>length</code> - <a href="#length"><code>length</code></a>.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.net.Uri,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DataSpec</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public&nbsp;DataSpec&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
                <a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream">@Flags</a>
                int&nbsp;flags)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
<div class="block">Constructs an instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - <a href="#uri"><code>uri</code></a>.</dd>
<dd><code>flags</code> - <a href="#flags"><code>flags</code></a>.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.net.Uri,long,long,java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DataSpec</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public&nbsp;DataSpec&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
                long&nbsp;position,
                long&nbsp;length,
                @Nullable
                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
<div class="block">Constructs an instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - <a href="#uri"><code>uri</code></a>.</dd>
<dd><code>position</code> - <a href="#position"><code>position</code></a>.</dd>
<dd><code>length</code> - <a href="#length"><code>length</code></a>.</dd>
<dd><code>key</code> - <a href="#key"><code>key</code></a>.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.net.Uri,long,long,java.lang.String,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DataSpec</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public&nbsp;DataSpec&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
                long&nbsp;position,
                long&nbsp;length,
                @Nullable
                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
                <a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream">@Flags</a>
                int&nbsp;flags)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
<div class="block">Constructs an instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - <a href="#uri"><code>uri</code></a>.</dd>
<dd><code>position</code> - <a href="#position"><code>position</code></a>.</dd>
<dd><code>length</code> - <a href="#length"><code>length</code></a>.</dd>
<dd><code>key</code> - <a href="#key"><code>key</code></a>.</dd>
<dd><code>flags</code> - <a href="#flags"><code>flags</code></a>.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.net.Uri,long,long,java.lang.String,int,java.util.Map)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DataSpec</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public&nbsp;DataSpec&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
                long&nbsp;position,
                long&nbsp;length,
                @Nullable
                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
                <a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream">@Flags</a>
                int&nbsp;flags,
                <a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;httpRequestHeaders)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
<div class="block">Constructs an instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - <a href="#uri"><code>uri</code></a>.</dd>
<dd><code>position</code> - <a href="#position"><code>position</code></a>, equal to <a href="#position"><code>position</code></a>.</dd>
<dd><code>length</code> - <a href="#length"><code>length</code></a>.</dd>
<dd><code>key</code> - <a href="#key"><code>key</code></a>.</dd>
<dd><code>flags</code> - <a href="#flags"><code>flags</code></a>.</dd>
<dd><code>httpRequestHeaders</code> - <a href="#httpRequestHeaders"><code>httpRequestHeaders</code></a></dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.net.Uri,long,long,long,java.lang.String,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DataSpec</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public&nbsp;DataSpec&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
                long&nbsp;absoluteStreamPosition,
                long&nbsp;position,
                long&nbsp;length,
                @Nullable
                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
                <a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream">@Flags</a>
                int&nbsp;flags)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
<div class="block">Constructs an instance where <a href="#uriPositionOffset"><code>uriPositionOffset</code></a> may be non-zero.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - <a href="#uri"><code>uri</code></a>.</dd>
<dd><code>absoluteStreamPosition</code> - The sum of <a href="#uriPositionOffset"><code>uriPositionOffset</code></a> and <a href="#position"><code>position</code></a>.</dd>
<dd><code>position</code> - <a href="#position"><code>position</code></a>.</dd>
<dd><code>length</code> - <a href="#length"><code>length</code></a>.</dd>
<dd><code>key</code> - <a href="#key"><code>key</code></a>.</dd>
<dd><code>flags</code> - <a href="#flags"><code>flags</code></a>.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.net.Uri,byte[],long,long,long,java.lang.String,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DataSpec</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public&nbsp;DataSpec&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
                @Nullable
                byte[]&nbsp;postBody,
                long&nbsp;absoluteStreamPosition,
                long&nbsp;position,
                long&nbsp;length,
                @Nullable
                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
                <a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream">@Flags</a>
                int&nbsp;flags)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>. Note that the httpMethod must be set explicitly for the
     Builder.</div>
</div>
<div class="block">Construct a instance where <a href="#uriPositionOffset"><code>uriPositionOffset</code></a> may be non-zero. The <a href="#httpMethod"><code>httpMethod</code></a>
 is inferred from <code>postBody</code>. If <code>postBody</code> is non-null then <a href="#httpMethod"><code>httpMethod</code></a> is
 set to <a href="#HTTP_METHOD_POST"><code>HTTP_METHOD_POST</code></a>. If <code>postBody</code> is null then <a href="#httpMethod"><code>httpMethod</code></a> is set
 to <a href="#HTTP_METHOD_GET"><code>HTTP_METHOD_GET</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - <a href="#uri"><code>uri</code></a>.</dd>
<dd><code>postBody</code> - <a href="#httpBody"><code>httpBody</code></a> The body of the HTTP request, which is also used to infer the
     <a href="#httpMethod"><code>httpMethod</code></a>.</dd>
<dd><code>absoluteStreamPosition</code> - The sum of <a href="#uriPositionOffset"><code>uriPositionOffset</code></a> and <a href="#position"><code>position</code></a>.</dd>
<dd><code>position</code> - <a href="#position"><code>position</code></a>.</dd>
<dd><code>length</code> - <a href="#length"><code>length</code></a>.</dd>
<dd><code>key</code> - <a href="#key"><code>key</code></a>.</dd>
<dd><code>flags</code> - <a href="#flags"><code>flags</code></a>.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.net.Uri,int,byte[],long,long,long,java.lang.String,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DataSpec</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public&nbsp;DataSpec&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
                <a href="DataSpec.HttpMethod.html" title="annotation in com.google.android.exoplayer2.upstream">@HttpMethod</a>
                int&nbsp;httpMethod,
                @Nullable
                byte[]&nbsp;httpBody,
                long&nbsp;absoluteStreamPosition,
                long&nbsp;position,
                long&nbsp;length,
                @Nullable
                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
                <a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream">@Flags</a>
                int&nbsp;flags)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
<div class="block">Construct a instance where <a href="#uriPositionOffset"><code>uriPositionOffset</code></a> may be non-zero.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - <a href="#uri"><code>uri</code></a>.</dd>
<dd><code>httpMethod</code> - <a href="#httpMethod"><code>httpMethod</code></a>.</dd>
<dd><code>httpBody</code> - <a href="#httpBody"><code>httpBody</code></a>.</dd>
<dd><code>absoluteStreamPosition</code> - The sum of <a href="#uriPositionOffset"><code>uriPositionOffset</code></a> and <a href="#position"><code>position</code></a>.</dd>
<dd><code>position</code> - <a href="#position"><code>position</code></a>.</dd>
<dd><code>length</code> - <a href="#length"><code>length</code></a>.</dd>
<dd><code>key</code> - <a href="#key"><code>key</code></a>.</dd>
<dd><code>flags</code> - <a href="#flags"><code>flags</code></a>.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.net.Uri,int,byte[],long,long,long,java.lang.String,int,java.util.Map)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DataSpec</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public&nbsp;DataSpec&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri,
                <a href="DataSpec.HttpMethod.html" title="annotation in com.google.android.exoplayer2.upstream">@HttpMethod</a>
                int&nbsp;httpMethod,
                @Nullable
                byte[]&nbsp;httpBody,
                long&nbsp;absoluteStreamPosition,
                long&nbsp;position,
                long&nbsp;length,
                @Nullable
                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;key,
                <a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream">@Flags</a>
                int&nbsp;flags,
                <a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;httpRequestHeaders)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a>.</div>
</div>
<div class="block">Construct a instance where <a href="#uriPositionOffset"><code>uriPositionOffset</code></a> may be non-zero.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - <a href="#uri"><code>uri</code></a>.</dd>
<dd><code>httpMethod</code> - <a href="#httpMethod"><code>httpMethod</code></a>.</dd>
<dd><code>httpBody</code> - <a href="#httpBody"><code>httpBody</code></a>.</dd>
<dd><code>absoluteStreamPosition</code> - The sum of <a href="#uriPositionOffset"><code>uriPositionOffset</code></a> and <a href="#position"><code>position</code></a>.</dd>
<dd><code>position</code> - <a href="#position"><code>position</code></a>.</dd>
<dd><code>length</code> - <a href="#length"><code>length</code></a>.</dd>
<dd><code>key</code> - <a href="#key"><code>key</code></a>.</dd>
<dd><code>flags</code> - <a href="#flags"><code>flags</code></a>.</dd>
<dd><code>httpRequestHeaders</code> - <a href="#httpRequestHeaders"><code>httpRequestHeaders</code></a>.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="getStringForHttpMethod(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStringForHttpMethod</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;getStringForHttpMethod&#8203;(<a href="DataSpec.HttpMethod.html" title="annotation in com.google.android.exoplayer2.upstream" target="_top">@HttpMethod</a>
                                            int&nbsp;httpMethod)</pre>
<div class="block">Returns an uppercase HTTP method name (e.g., "GET", "POST", "HEAD") corresponding to the given
 <a href="DataSpec.HttpMethod.html" title="annotation in com.google.android.exoplayer2.upstream"><code>DataSpec.HttpMethod</code></a>.</div>
</li>
</ul>
<a id="isFlagSet(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFlagSet</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isFlagSet&#8203;(<a href="DataSpec.Flags.html" title="annotation in com.google.android.exoplayer2.upstream">@Flags</a>
                         int&nbsp;flag)</pre>
<div class="block">Returns whether the given flag is set.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>flag</code> - Flag to be checked if it is set.</dd>
</dl>
</li>
</ul>
<a id="getHttpMethodString()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHttpMethodString</h4>
<pre class="methodSignature">public final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;getHttpMethodString()</pre>
<div class="block">Returns the uppercase HTTP method name (e.g., "GET", "POST", "HEAD") corresponding to the
 <a href="#httpMethod"><code>httpMethod</code></a>.</div>
</li>
</ul>
<a id="buildUpon()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildUpon</h4>
<pre class="methodSignature">public&nbsp;<a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream">DataSpec.Builder</a>&nbsp;buildUpon()</pre>
<div class="block">Returns a <a href="DataSpec.Builder.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec.Builder</code></a> initialized with the values of this instance.</div>
</li>
</ul>
<a id="subrange(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subrange</h4>
<pre class="methodSignature">public&nbsp;<a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a>&nbsp;subrange&#8203;(long&nbsp;offset)</pre>
<div class="block">Returns a data spec that represents a subrange of the data defined by this DataSpec. The
 subrange includes data from the offset up to the end of this DataSpec.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offset</code> - The offset of the subrange.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A data spec that represents a subrange of the data defined by this DataSpec.</dd>
</dl>
</li>
</ul>
<a id="subrange(long,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subrange</h4>
<pre class="methodSignature">public&nbsp;<a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a>&nbsp;subrange&#8203;(long&nbsp;offset,
                         long&nbsp;length)</pre>
<div class="block">Returns a data spec that represents a subrange of the data defined by this DataSpec.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offset</code> - The offset of the subrange.</dd>
<dd><code>length</code> - The length of the subrange.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A data spec that represents a subrange of the data defined by this DataSpec.</dd>
</dl>
</li>
</ul>
<a id="withUri(android.net.Uri)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withUri</h4>
<pre class="methodSignature">public&nbsp;<a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a>&nbsp;withUri&#8203;(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;uri)</pre>
<div class="block">Returns a copy of this data spec with the specified Uri.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - The new source <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The copied data spec with the specified Uri.</dd>
</dl>
</li>
</ul>
<a id="withRequestHeaders(java.util.Map)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withRequestHeaders</h4>
<pre class="methodSignature">public&nbsp;<a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a>&nbsp;withRequestHeaders&#8203;(<a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;httpRequestHeaders)</pre>
<div class="block">Returns a copy of this data spec with the specified HTTP request headers. Headers already in
 the data spec are not copied to the new instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>httpRequestHeaders</code> - The HTTP request headers.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The copied data spec with the specified HTTP request headers.</dd>
</dl>
</li>
</ul>
<a id="withAdditionalHeaders(java.util.Map)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withAdditionalHeaders</h4>
<pre class="methodSignature">public&nbsp;<a href="DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a>&nbsp;withAdditionalHeaders&#8203;(<a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;additionalHttpRequestHeaders)</pre>
<div class="block">Returns a copy this data spec with additional HTTP request headers. Headers in <code>
 additionalHttpRequestHeaders</code> will overwrite any headers already in the data spec that have the
 same keys.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>additionalHttpRequestHeaders</code> - The additional HTTP request headers.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The copied data spec with the additional HTTP request headers.</dd>
</dl>
</li>
</ul>
<a id="toString()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Object.html#toString()" title="class or interface in java.lang" class="externalLink">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
